# Copyright (c) 2017 by Michael Zahniser
# Copyright (c) 2018 by Zitchas
# Copyright (c) 2022 by williaji
#
# Endless Sky is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later version.
#
# Endless Sky is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

mission "Remnant: Bounty"
	job
	repeat
	name "損傷した<npc model>の賞金首"
	description "損傷したコラス船がレムナント領内に潜んでいる。これを狩り、その後<planet>へ戻って報酬<payment>を受け取れ。"
	source
		government "Remnant"
	to offer
		has "Remnant: Defense 2: done"
		or
			not "remnant: ssil vida active"
			not "flagship planet: Ssil Vida"
		random < 60
	npc kill
		government "Korath"
		personality coward target uninterested marked waiting
		system
			distance 1 2
		fleet
			names "korath"
			cargo 3
			commodities "Food" "Clothing" "Metal" "Plastic" "Medical" "Heavy Metals"
			variant
				"Palavret (Crippled)"
		dialog "あなたはコラス船を破壊した。もう<planet>に戻って報酬を受けとれる。"
	on visit
		dialog phrase "generic bounty hunting on visit"
	on complete
		payment 300000
		dialog "レムナントの軍事指導者が 「<npc>」 を追いつめたことであなたに礼を言い、取り決めどおり <payment>の報酬を支払った。"



mission "Remnant: Bounty 2"
	job
	repeat
	name "厄介な<npc model>の賞金首"
	description "コラス船がレムナント領内で厄介を起こしている。これを狩り、その後<planet>へ戻って報酬<payment>を受け取れ。"
	source
		government "Remnant"
	to offer
		has "Remnant: Salvage 4: offered"
		or
			not "remnant: ssil vida active"
			not "flagship planet: Ssil Vida"
		random < 50
	npc kill
		government "Korath"
		personality heroic vindictive target uninterested waiting marked
		system
			distance 1 2
		fleet
			names "korath"
			cargo 3
			commodities "Food" "Clothing" "Metal" "Plastic" "Medical" "Heavy Metals"
			variant
				"Palavret (Hyperdrive)"
		dialog "あなたはコラス船を破壊した。もう<planet>に戻って報酬を受けとれる。"
	on visit
		dialog phrase "generic bounty hunting on visit"
	on complete
		payment 400000
		dialog "レムナントの軍事指導者がコラス船 「<npc>」 を追いつめたことであなたに礼を言い、取り決めどおり <payment>の報酬を支払った。"



mission "Remnant: Broken Jump Drive job"
	name "破損したジャンプドライブの輸送"
	description "<planet>の研究者たちは、研究計画をつづけるために、もうひとつ壊れたジャンプドライブを必要としている。"
	job
	repeat 4
	to offer
		has "Remnant: Broken Jump Drive 5: done"
		or
			not "remnant: ssil vida active"
			not "flagship planet: Ssil Vida"
			
	source
		government "Remnant"
	destination
		government "Remnant"
		attributes outfitter
		not attributes "remnant station"
		not distance 0
	on visit
		dialog phrase "broken jump drive on visit"
	on complete
		outfit "Jump Drive (Broken)" -1
		"remnant: broken jump drive count" ++
		payment 300000
		"reputation: Remnant" ++
		"Remnant: Broken Jump Drive job: offered" --
		dialog "研究班はすばやく壊れたジャンプドライブを荷降ろしし、あなたに <payment>支払った。それから急いで研究所に戻っていく。"



mission "Remnant: Expanded Horizons Astral job"
	job
	repeat
	name "<waypoints>への学術調査隊"
	description "研究用実験室を積んで<waypoints>へ向かい、資料を集めてから<destination>へ戻れ。"
	source
		government "Remnant"
	waypoint
		not attributes "pleiades"
		not attributes "tangled shroud"
		not attributes "twilight"
		not attributes "outer limits"
		not attributes "beyond patir"
		visited
	to offer
		has "Remnant: Expanded Horizons Astral 2: done"
		not "Ka'het: Patir Mystery 35: done"
		random < 50
	on offer
		require "Research Laboratory"
	on waypoint
		dialog "科学者が実験室を開いて必要な観測をする。すこしあとに、科学者はデータクリスタル一式にまとめた情報をもって、離れる用意はすべてできたとあなたに伝えた。"
	on complete
		payment 500000
		"reputation: Remnant" ++
		dialog "着陸すると、研究員は調査した星系の情報が入ったデータクリスタルをすばやく回収し、<payment>の物流分配をあなたに手渡した。"



mission "Remnant: Expanded Horizons Astral job late"
	job
	repeat
	name "<waypoints>への学術調査隊"
	description "研究用実験室を積んで<waypoints>へ向かい、資料を集めてから<destination>へ戻れ。"
	source
		government "Remnant"
	waypoint
		not attributes "pleiades"
		not attributes "inaccessible"
		not attributes "tangled shroud"
		not attributes "twilight"
		not attributes "outer limits"
	to offer
		has "Remnant: Expanded Horizons Astral 2: done"
		has "Ka'het: Patir Mystery 35: done"
		random < 50
	on offer
		require "Research Laboratory"
	on waypoint
		dialog "科学者が実験室を開いて必要な観測をする。すこしあとに、科学者はデータクリスタル一式にまとめた情報をもって、離れる用意はすべてできたとあなたに伝えた。"
	on complete
		payment 500000
		"reputation: Remnant" ++
		dialog "着陸すると、研究員は調査した星系の情報が入ったデータクリスタルをすばやく回収し、<payment>の物流分配をあなたに手渡した。"



mission "Remnant: Bounty 3"
	job
	repeat
	name "損傷したラノエレクの賞金首"
	description "傷ついたコラス船がレムナント領内に潜んでいる。これを狩り、その後<planet>へ戻って報酬<payment>を受け取れ。"
	source
		government "Remnant"
	to offer
		# 0.9.13 Compatibility patch
		or
			has "Remnant: Cognizance 4: done"
			has "Remnant: Cognizance 4: failed"
		not "Remnant: Cognizance 4: aborted"
		random < 40
	npc kill
		government "Korath"
		personality heroic vindictive target uninterested waiting marked
		system
			distance 1 2
		fleet
			names "korath"
			cargo 3
			commodities "Food" "Clothing" "Metal" "Plastic" "Medical" "Heavy Metals"
			variant
				"Rano'erek (Crippled)"
		dialog "あなたはコラス船を破壊した。もう<planet>に戻って報酬を受けとれる。"
	on visit
		dialog phrase "generic bounty hunting on visit"
	on complete
		payment 400000
		dialog "レムナントの軍事指導者がコラス船 「<npc>」 を追いつめたことであなたに礼を言い、取り決めどおり <payment>の報酬を支払った。"



mission "Remnant: Bounty 4"
	job
	repeat
	name "略奪中のラノエレクの賞金首"
	description "コラス船がレムナント領内を荒らし回っている。これを狩り、その後<planet>へ戻って報酬<payment>を受け取れ。"
	source
		government "Remnant"
	to offer
		has "Remnant: Cognizance 14: done"
		random < 30
	npc kill
		government "Korath"
		personality heroic vindictive target uninterested waiting marked
		system
			distance 1 2
		fleet
			names "korath"
			cargo 3
			commodities "Food" "Clothing" "Metal" "Plastic" "Medical" "Heavy Metals"
			variant
				"Rano'erek (Crippled)"
		dialog "あなたはコラス船を破壊した。もう<planet>に戻って報酬を受けとれる。"
	on visit
		dialog phrase "generic bounty hunting on visit"
	on complete
		payment 500000
		dialog "レムナントの軍事指導者がコラス船 「<npc>」 を追いつめたことであなたに礼を言い、取り決めどおり <payment>の報酬を支払った。"



mission "Remnant: Bounty 5"
	job
	repeat
	name "地上襲撃部隊撃破の賞金"
	description "コラス船がエンバーウェイストで我々の前哨地を探している。これを追い詰め、積んでいる戦闘機もろとも排除し、その後<planet>へ戻って報酬<payment>を受け取れ。"
	source
		government "Remnant"
	to offer
		has "Remnant: Cognizance 29: done"
		or
			not "remnant: ssil vida active"
			not "flagship planet: Ssil Vida"
		random < 5
	npc kill
		government "Korath"
		personality heroic vindictive target marked staying
		system
			attributes "ember waste"
			not attributes "graveyard"
			not attributes "twilight"
		fleet
			names "korath"
			cargo 3
			commodities "Food" "Clothing" "Metal" "Plastic" "Medical" "Heavy Metals"
			variant
				"Rano'erek (Ground Assault)"
				"'olofez" 4
		dialog "コラス船とその戦闘機を破壊した。<planet>へ戻って報酬を受け取れる。"
	on visit
		dialog "<planet>に着陸したが、コラス船とその戦闘機をすべて排除できていない。戻る前に追い詰めて破壊すること。"
	on complete
		payment 400000
		dialog "レムナントの軍の指揮官が、コラス船<npc>とその戦闘機を狩ったことに礼を言い、約束の報酬<payment>を渡す。"



mission "Remnant: Logistics Civil Engineering"
	name "民生品の配達を<planet>へ"
	description "<planet>の技術者が<cargo>の配達を必要としている。輸送分の割り当ては<payment>。"
	cargo "レムナント民生品" 20 4 .1
	job
	repeat
	to offer
		not "remnant: ssil vida active"
		has "Remnant: Logistics 1: done"
		random < 51
	source
		government "Remnant"
		not planet "Ssil Vida"
	destination
		government "Remnant"
		not distance 0
		not planet "Ssil Vida"
		not planet "Esquiline"
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		dialog "事業の技術者が<cargo>を検めて、<payment>の支払いを承認する。"
		payment
		payment 10000



mission "Remnant: Logistics Industrial Delivery"
	name "工業品の配達を<planet>へ"
	description "<planet>の事業班が<cargo>の配達を必要としている。輸送分の割り当ては<payment>。"
	cargo "レムナント工業品" 20 4 .03
	job
	repeat
	to offer
		not "remnant: ssil vida active"
		has "Remnant: Logistics 1: done"
		"Remnant: Logistics Civil Engineering: done" >= 9
		random < 76
	source
		government "Remnant"
	destination
		government "Remnant"
		not distance 0
		not planet "Ssil Vida"
		not planet "Esquiline"
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		dialog "事業の技師が<cargo>を検めて、<payment>の支払いを認める。"
		payment
		payment 15000



mission "Remnant: Logistics Outfitter Delivery"
	name "部品の配達を<planet>へ"
	description "<planet>の装備店の修理班が<cargo>の部品の配達を必要としている。輸送分の割り当ては<payment>。"
	cargo "レムナント艤装修理品" 20 3 .04
	job
	repeat
	to offer
		not "remnant: ssil vida active"
		has "Remnant: Logistics 1: done"
		has "license: Remnant"
		"Remnant: Logistics Industrial Delivery: done" >= 9
		random < 30
	source
		government "Remnant"
	destination
		government "Remnant"
		not distance 0
		not planet "Ssil Vida"
		not planet "Esquiline"
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		dialog "修理技師が<cargo>の部品を検めて、<payment>の支払いを承認する。"
		payment
		payment 30000



mission "Remnant: Logistics Salvage Delivery"
	name "回収品の配達を<planet>へ"
	description "最近の回収作業で得た<cargo>の部品を、研究・再生・再利用のため<planet>の装備店へ届けよ。輸送分の割り当ては<payment>。"
	cargo "レムナント回収品" 5 4 .06
	job
	repeat
	to offer
		not "remnant: ssil vida active"
		has "Remnant: Logistics 1: done"
		has "license: Remnant Capital"
		"Remnant: Logistics Outfitter Delivery: done" >= 9
		random < 11
	source
		government "Remnant"
	destination
		government "Remnant"
		not distance 0
		not planet "Ssil Vida"
		not planet "Esquiline"
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		dialog "武装した修理技師二人が<cargo>を検めて、<payment>の支払いを承認する。"
		payment 25000 300



mission "Remnant: Rescue"
	job
	repeat
	name "捜索救助 : 偵察"
	description "<npc>がエンバーウェイストでの偵察任務中に行方不明になった。見つけ出し、<destination>へ帰れるよう手を貸せ。"
	source
		government "Remnant"
	to offer
		has "Remnant: Learn Sign Follow Up: offered"
		random < 10
	npc accompany save
		system
			attributes "ember waste"
			not attributes "ka'het"
			not attributes "graveyard"
			not government "Remnant"
			not near "Arculus" 3
			near "Arculus" 30
				"all wormholes"
		personality derelict timid plunders
		government "Remnant"
		fleet
			names "remnant"
			variant
				Starling
			variant
				Gull
	on complete
		"remnant: rescue missions" ++
		payment 200000
		dialog
			"通信機が<payment>の資源割り当てを知らせてくる。"
	on visit
		dialog
			"戻ってきたが、<npc>はまだ行方不明のままだ。"



# The Rescue Dummy is meant to commit suicide as soon as possible on entering the randomized system.
ship "Rescue Dummy"
	"display name" "救助ダミー"
	plural "救助ダミー"
	# sprite "ship/behemoth"
	attributes
		category "Game Mechanics"
		"heat dissipation" 1
		"hull" 1
		"mass" 10
		"drag" 1
		"automaton" 1
		"energy generation" 1
		"thrust" 30
		"turn" 30
	outfits
		"Suicide Gun"
	gun 0 0

outfit "Suicide Gun"
	"display name" "自爆砲"
	plural "自爆砲"
	category "Guns"
	thumbnail "outfit/unknown"
	"gun ports" -1
	weapon
		velocity 100
		lifetime 10
		reload 1
		"blast radius" 900
		"shield damage" 0.01
		"hull damage" 1



mission "Remnant: Rescue 1B"
	job
	repeat
	name "捜索救助 : 偵察"
	description "<npc>がエンバーウェイストでの偵察任務中に行方不明になった。見つけ出し、<destination>へ帰れるよう手を貸せ。"
	source
		government "Remnant"
	to offer
		has "Remnant: Learn Sign Follow Up: offered"
		random < 1
	npc kill
		system
			attributes "ember waste"
			not attributes "ka'het"
			not attributes "graveyard"
			not government "Remnant"
			not near "Arculus" 3
			near "Arculus" 30
				"all wormholes"
		personality staying heroic nemesis unconstrained
		government "Test Dummy"
		fleet
			names "remnant"
			variant
				"Rescue Dummy"
		dialog
			"星系に入ると、センサーが大量の残骸をとらえる。詳しく調べると、最悪の予感が裏づけられる。<npc>は破壊されていた。その後の数時間、あなたは必死に生存者を探し続けるが、一分過ぎるごとに望みはしぼんでいく。"
	on complete
		"remnant: rescue missions" ++
		payment 200000
		dialog
			"着陸したあなたは、重い心で<npc>が乗員もろとも失われたと報告する。レムナントはその知らせに沈むが、それでも礼を言い、<payment>の資源割り当てを手渡す。"
	on visit
		dialog
			"戻ってきたが、<npc>はまだ行方不明のままだ。"



mission "Remnant: Rescue 2"
	job
	repeat
	name "捜索救助 : 回収"
	description "<npc>がエンバーウェイストでの技術回収任務中に行方不明になった。見つけ出し、<destination>へ帰れるよう手を貸せ。"
	source
		government "Remnant"
	to offer
		has "Remnant: Learn Sign Follow Up: offered"
		random < 10
	npc accompany save
		system
			attributes "ember waste"
			not attributes "ka'het"
			not attributes "graveyard"
			not government "Remnant"
			not near "Arculus" 3
			near "Arculus" 30
				"all wormholes"
		personality derelict timid plunders
		government "Remnant"
		fleet
			names "remnant"
			variant 7
				Gull
			variant 3
				Starling
			variant 3
				Pelican
	on complete
		"remnant: rescue missions" ++
		payment 300000
		dialog
			"通信機が<payment>の資源割り当てと、短い感謝の言葉を知らせてくる。"
	on visit
		dialog
			"戻ってきたが、<npc>はまだ行方不明のままだ。"



mission "Remnant: Rescue 2B"
	job
	repeat
	name "捜索救助 : 回収"
	description "<npc>がエンバーウェイストでの技術回収任務中に行方不明になった。見つけ出し、<destination>へ帰れるよう手を貸せ。"
	source
		government "Remnant"
	to offer
		has "Remnant: Learn Sign Follow Up: offered"
		random < 3
	npc kill
		system
			attributes "ember waste"
			not attributes "ka'het"
			not attributes "graveyard"
			not government "Remnant"
			not near "Arculus" 3
			near "Arculus" 30
				"all wormholes"
		personality staying heroic nemesis unconstrained
		government "Test Dummy"
		fleet
			names "remnant"
			variant
				"Rescue Dummy"
		dialog
			"星系に入ると、センサーが大量の残骸をとらえる。詳しく調べると、最悪の予感が裏づけられる。<npc>は破壊されていた。その後の数時間、あなたは必死に生存者を探し続けるが、一分過ぎるごとに望みはしぼんでいく。"
	on complete
		"remnant: rescue missions" ++
		payment 300000
		dialog
			"着陸したあなたは、重い心で<npc>が乗員もろとも失われたと報告する。レムナントはその知らせに沈むが、それでも礼を言い、<payment>の資源割り当てを手渡す。"
	on visit
		dialog
			"戻ってきたが、<npc>はまだ行方不明のままだ。"



mission "Remnant: Rescue 3"
	job
	repeat
	name "捜索救助 : 補給船"
	description "<npc>がエンバーウェイストでの補給行の最中に行方不明になった。見つけ出し、<destination>へ帰れるよう手を貸せ。"
	source
		government "Remnant"
	to offer
		has "Remnant: Learn Sign Follow Up: offered"
		random < 10
	npc accompany save
		system
			attributes "ember waste"
			not attributes "ka'het"
			not attributes "graveyard"
			not government "Remnant"
			not near "Arculus" 3
			near "Arculus" 30
				"all wormholes"
		personality derelict timid plunders
		government "Remnant"
		fleet
			names "remnant"
			variant 7
				Pelican
			variant 2
				Gull
	on complete
		"remnant: rescue missions" ++
		payment 300000
		dialog
			"通信機が<payment>の資源割り当てと、<npc>の船長からの礼を知らせてくる。"
	on visit
		dialog
			"戻ってきたが、<npc>はまだ行方不明のままだ。"



mission "Remnant: Rescue 3B"
	job
	repeat
	name "捜索救助 : 補給船"
	description "<npc>がエンバーウェイストでの補給行の最中に行方不明になった。見つけ出し、<destination>へ帰れるよう手を貸せ。"
	source
		government "Remnant"
	to offer
		has "Remnant: Learn Sign Follow Up: offered"
		random < 3
	npc kill
		system
			attributes "ember waste"
			not attributes "ka'het"
			not attributes "graveyard"
			not government "Remnant"
			not near "Arculus" 3
			near "Arculus" 30
				"all wormholes"
		personality staying heroic nemesis unconstrained
		government "Test Dummy"
		fleet
			names "remnant"
			variant
				"Rescue Dummy"
		dialog
			"星系に入ると、センサーが大量の残骸をとらえる。詳しく調べると、最悪の予感が裏づけられる。<npc>は破壊されていた。その後の数時間、あなたは必死に生存者を探し続けるが、一分過ぎるごとに望みはしぼんでいく。"
	on complete
		"remnant: rescue missions" ++
		payment 300000
		dialog
			"着陸したあなたは、重い心で<npc>が乗員もろとも失われたと報告する。レムナントはその知らせに沈むが、それでも礼を言い、<payment>の資源割り当てを手渡す。"
	on visit
		dialog
			"戻ってきたが、<npc>はまだ行方不明のままだ。"



mission "Remnant: Rescue 4"
	job
	repeat
	name "遭難信号 : 墓場"
	description "墓地にいる<npc>から遭難信号が届いた。計測情報をたどって見つけ出し、<destination>へ無事に帰れるよう手を貸せ。"
	source
		government "Remnant"
	to offer
		has "Remnant: Learn Sign Follow Up: offered"
		has "First Contact: Ka'het: Remnant 1B: offered"
		random < 10
	npc accompany save
		system
			attributes "graveyard"
			not government "Remnant"
			near "Nona" 20
				"only unrestricted wormholes"
		personality escort derelict heroic plunders
		government "Remnant"
		fleet
			names "remnant"
			variant 8
				Albatross
			variant 2
				Ibis
	on complete
		"remnant: rescue missions" ++
		payment 500000
		dialog
			"着陸すると、<npc>の船長が自らあなたの船まで来て、墓地から救い出してくれたことに直に礼を言い、心のこもった一言を残す。「燃えさしが、あなたのために明るく輝きますように」"
			"	まもなく、通信機が<payment>の資源割り当てを知らせてくる。"
	on visit
		dialog
			"戻ってきたが、<npc>はまだ戻っていない。"



mission "Remnant: Rescue 5"
	job
	repeat
	name "捜索救助 : 終点"
	description "テルミヌス周辺を偵察していた<npc>から、報告が途絶えた。何があったのかを突き止め、<destination>へ戻れ。"
	source
		government "Remnant"
	to offer
		has "Remnant: Learn Sign Follow Up: offered"
		random < 10
	npc accompany save
		system
			near "Terminus" 2
		personality derelict timid plunders
		government "Remnant"
		fleet
			names "remnant"
			variant 6
				Gull
			variant 3
				Starling
	on complete
		"remnant: rescue missions" ++
		payment 500000
		dialog
			"二度と燃えさしを見られないのではと案じていた<npc>の船長は、通信機が<payment>の資源割り当てを知らせるより先に、家へ連れ帰ってくれたことへ直に礼を言う。"
	on visit
		dialog
			"戻ってきたが、行方不明の船からはいまだ何の知らせもない。"


mission "Remnant: Disable 1"
	job
	repeat
	name "損傷したダスナク・アアウォジの無力化"
	description "傷ついたダスナク・アアウォジが、ポストウェルタの近く、新たに行けるようになった星系で立ち往生している。多数の民間人が乗っているため、惨劇を避けるべく無力化のみに留めてほしい。<planet>へ戻れば輸送分の割り当て<payment>を受け取れる。"
	source
		government "Remnant"
	to offer
		has "Remnant: Will Not Someone Please Think Of The Children: done"
		not "Remnant: Disable 1: aborted"
		not "Remnant: Disable 1: failed"
		random < 5
	npc disable save
		government "Korath"
		personality heroic target marked staying disables plunders
		system
			near "Vaticanus" 1
		fleet
			names "korath"
			variant
				"Kas'lor Ik 582 (Stranded)"
		dialog "ダスナク・アアウォジを無力化した。<planet>へ報告に戻る時だ。"
	on visit
		dialog "<planet>に着陸したが、立ち往生しているダスナク・アアウォジをまだ無力化していない。戻る前に追い詰めて無力化すること。"
	on abort
		dialog "レムナントはあなたがこの任務を途中でやめたことに戸惑っているが、別の誰かを送ると告げる。今後この手の任務は他の班を優先すると言い添えられる。"
	on fail
		"reputation: Remnant" -= 250
		dialog "ダスナク・アアウォジを破壊せずに無力化することができなかった……レムナントは喜ばないだろう……"
	on complete
		"remnant: disable and save count" ++
		payment 2000000
		dialog "レムナントの軍の監督官が、ダスナク・アアウォジ<npc>を無力化したことに礼を言い、約束の輸送分の割り当て<payment>を渡す。"
